ToString Method

Task Parallel System.Threading

Creates and returns a string representation of this instance for the current thread.

Namespace:  System.Threading
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Overrides Function ToString As String
C#
public override string ToString()

Return Value

The result of calling ToString()()() on the Value.

Remarks

Calling this method forces initialization for the current thread, as is the case with accessing Value directly.

Exceptions

ExceptionCondition
System..::.NullReferenceException The Value for the current thread is a null reference (Nothing in Visual Basic).
System..::.InvalidOperationException The initialization function referenced Value in an improper manner.
System..::.ObjectDisposedException The ThreadLocal<(Of <(T>)>) instance has been disposed.

See Also